﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Search.aspx.cs" Inherits="ADECMS.UserPages.Search" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <style type="text/css">

        .style2
        {
            width: 209px;
        }
        
        .style1
        {
            width: 696px;
        }
        </style>
        <link href="../Css/ADEStylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server"> 
                    <asp:ScriptManager ID="ScriptManager1" runat="server">
                    </asp:ScriptManager>
        <table style="height: 150px;">
            <tr>
                <td style="font-family: Segoe Script; font-size: 48px; color: Purple; width: 20%;">
                    <a href="Start.aspx" style="font-family: Segoe Script; font-size: 48px; color: Purple; width: 20%; text-decoration:none;">
                    ADE
                    </a>
                </td>
                <td>
                    <asp:Label ID="Label1" runat="server" CssClass="inputLabel"></asp:Label>
                    &nbsp;
                    &nbsp;
                    <asp:LinqDataSource ID="LinqDataSource3" runat="server" ContextTypeName="ADECMS.ADECMSDBDataContext"
                        OrderBy="id desc" Select="new (title)" TableName="NEWs">
                    </asp:LinqDataSource>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="height: 45px;">
                    &nbsp;
                </td>
            </tr>
        </table>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:Menu ID="Menu1" runat="server" Height="35px" onmenuitemclick="Menu1_MenuItemClick" 
                        Orientation="Horizontal" Width="664px" MaximumDynamicDisplayLevels="4" 
                    DisappearAfter="2000" Font-Bold="True" Font-Size="Small" ForeColor="Black">
                    <DynamicHoverStyle BackColor="#666666" />
                    <DynamicMenuStyle BackColor="Silver" />
                    <DynamicMenuItemStyle BackColor="Silver" />
                    <StaticHoverStyle BackColor="Gray" />
                    <Items>
                        <asp:MenuItem Text="Sign out" Value="Sign out"></asp:MenuItem>
                        <asp:MenuItem Text="Novosti" Value="Novosti">
                            <asp:MenuItem Text="Dodaj novost" Value="Dodaj novost" 
                                    Target="/UserPages/AddNews.aspx"></asp:MenuItem>
                            <asp:MenuItem Target="/UserPages/Search.aspx" 
                                    Text="Pretraga" Value="Pretraga"></asp:MenuItem>
                        </asp:MenuItem>
                        <asp:MenuItem Text="File manager" Value="File manager">
                            <asp:MenuItem Text="File upload" Value="File upload"></asp:MenuItem>
                             <asp:MenuItem Text="File download" Value="File download"></asp:MenuItem>
                        </asp:MenuItem>
                        <asp:MenuItem Text="Slide manager" Value="Slide manager">
                            <asp:MenuItem Text="Upload prezentacije" Value="Upload prezentacije">
                            </asp:MenuItem>
                            <asp:MenuItem Text="Pregled prezentacije" Value="Pregled prezentacije">
                            </asp:MenuItem>
                        </asp:MenuItem>
                        <asp:MenuItem Text="Profili" Value="Profili">
                            <asp:MenuItem Text="Pregledaj profil" 
                                    Value="Pregledaj profil"></asp:MenuItem>
                            <asp:MenuItem Text="Edituj profil" Value="Edituj profil"></asp:MenuItem>
                        </asp:MenuItem>
                    </Items>
                </asp:Menu>
            </ContentTemplate>
        </asp:UpdatePanel>
        
        <table>
            <tr style="height:20px">
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr style="height:20px">
                <td>
                    <asp:Label ID="Label18" runat="server" Text="Pretraga novosti:" 
                        CssClass="registracijaHeader"></asp:Label>
                </td>
            </tr>
            <tr style="height:20px">
                <td>
                    &nbsp;
                </td>
            </tr>
        </table>
        <table>
            <tr>
                <td>
                    <table>
                        <tr>
                            <td>
                                <asp:TextBox ID="TextBoxTrazi" runat="server" style="margin-left: 5px" 
                                    Width="200px" CssClass="inputText"></asp:TextBox>
                                <asp:Button ID="ButtonTrazi" runat="server" onclick="ButtonTrazi_Click" 
                                    style="margin-left: 10px" Text="Trazi" />
                                <asp:Button ID="ButtonBack" runat="server" onclick="ButtonBack_Click" 
                                    style="margin-left: 10px" Text="Back" />
                                &nbsp;&nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:CheckBox ID="CheckBoxNaslov" runat="server" CssClass="inputLabel"
                                    Text="Uključi i naslove u pretragu" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:CheckBox ID="CheckBoxKategorija" runat="server" CssClass="inputLabel"
                                    Text="Uključi odabir kategorije" />
                                 <asp:DropDownList ID="DropDownList1" runat="server" CssClass="inputText" 
                                    DataSourceID="LinqDataSource2" DataTextField="name" DataValueField="name" 
                                    style="margin-left: 8px">
                                </asp:DropDownList>
                            </td>                                
                        </tr>
                    </table>                     
                    <br />
                    <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
                        ContextTypeName="ADECMS.ADECMSDBDataContext" 
                        onselecting="LinqDataSource1_Selecting" Select="new (title)" 
                        TableName="NEWs">
                    </asp:LinqDataSource>
                    <asp:LinqDataSource ID="LinqDataSource2" runat="server" 
                        ContextTypeName="ADECMS.ADECMSDBDataContext" OrderBy="name" 
                        Select="new (name)" TableName="CATEGORies" Where="type == @type">
                        <WhereParameters>
                            <asp:Parameter DefaultValue="news" Name="type" Type="String" />
                        </WhereParameters>
                    </asp:LinqDataSource>
                    <hr />
                    <table>
                        <tr>
                            <td align="center" class="style2" valign="top">
                                <asp:ListView ID="ListView1" runat="server" DataSourceID="LinqDataSource1" 
                                    onitemcommand="ListView1_ItemCommand">
                                    <ItemTemplate>
                                        <tr style="">
                                            <td>
                                    <!--<asp:Label ID="naslovLabel" runat="server" Text='<%# Eval("title") %>' />-->
                                                <asp:Button ID="OdaberiClanak" runat="server" 
                                                    CommandArgument='<%#Eval("title") %>' CommandName="BtnClick" 
                                                    Text='<%#Eval("title") %>' Width="195px" />
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                    <EmptyDataTemplate>
                                        <table ID="Table1" runat="server" style="">
                                            <tr>
                                                <td>
                                                </td>
                                            </tr>
                                        </table>
                                    </EmptyDataTemplate>
                                    <InsertItemTemplate>
                                        <tr style="">
                                            <td>
                                                <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                                                    Text="Insert" />
                                                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                                                    Text="Clear" />
                                            </td>
                                            <td>
                                                <asp:TextBox ID="naslovTextBox" runat="server" Text='<%# Bind("title") %>' />
                                            </td>
                                        </tr>
                                    </InsertItemTemplate>
                                    <LayoutTemplate>
                                        <table ID="Table2" runat="server">
                                            <tr ID="Tr1" runat="server">
                                                <td ID="Td1" runat="server">
                                                    <table ID="itemPlaceholderContainer" runat="server" border="0" style="">
                                                        <tr ID="Tr2" runat="server" style="">
                                                            <th ID="Th1" runat="server">
                                                                navigator</th>
                                                        </tr>
                                                        <tr ID="itemPlaceholder" runat="server">
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr ID="Tr3" runat="server">
                                                <td ID="Td2" runat="server" style="">
                                                </td>
                                            </tr>
                                        </table>
                                    </LayoutTemplate>
                                    <EditItemTemplate>
                                        <tr style="">
                                            <td>
                                                <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                                                    Text="Update" />
                                                <asp:Button ID="CancelButton0" runat="server" CommandName="Cancel" 
                                                    Text="Cancel" />
                                            </td>
                                            <td>
                                                <asp:TextBox ID="naslovTextBox0" runat="server" Text='<%# Bind("title") %>' />
                                            </td>
                                        </tr>
                                    </EditItemTemplate>
                                    <SelectedItemTemplate>
                                        <tr style="">
                                            <td>
                                                <asp:Label ID="naslovLabel" runat="server" Text='<%# Eval("title") %>' />
                                            </td>
                                        </tr>
                                    </SelectedItemTemplate>
                                </asp:ListView>
                            </td>
                            <td>
                            </td>
                            <td align="center" class="style1" valign="top">
                                <asp:Label ID="ClanakNaslov" runat="server" Font-Bold="True" Font-Size="Larger"></asp:Label>
                                <br />
                                <br />
                                <div align="justify" dir="ltr" style="background-color: #CCCCCC">
                                   <asp:Label ID="ClanakText" runat="server"></asp:Label>
                                <br />
                                 <br />
                              
                                   <asp:Label ID="ClanakAutorDat" runat="server"></asp:Label>
                                </div>
                                <br />
                                <br />
                                <br />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
